<template>
  <div class="error" v-if="ownState === null ? errorState : ownState">
    <p class="tip">数据异常，请稍后重试</p>
  </div>
</template>
<script>
  import { mapGetters } from 'vuex'
  export default{
    name: 'error',
    props: {
      ownState: {
        default: null
      }
    },
    computed: {
      ...mapGetters(
        ['errorState', 'loadingState']
      )
    }
  }
</script>
<style lang="less" scoped>
  .error{
    position: absolute;
    z-index: 1;
    background: #fff url("~assets/images/error.png") no-repeat center 30%;
    background-size: 60% 50%;
    width: 100%;
    height: 100%;
  }
  .tip{
    position: absolute;
    font-size: .12rem;
    width: 100%;
    bottom: 10%;
  }
</style>
